package com.yzl.frelink.entities.model;

import lombok.Data;

@Data
public class Line {
    String fromComponent;
    int fromPortNum;
    String toComponent;
    int toPortNum;

    public Line(String fromComponent, int fromPortNum, String toComponent, int toPortNum) {
        this.fromComponent = fromComponent;
        this.fromPortNum = fromPortNum;
        this.toComponent = toComponent;
        this.toPortNum = toPortNum;
    }

    public String getSource() {
        return "\"" + fromComponent + "/" + fromPortNum + "\"";
    }

    public String getDestination() {
        return "\"" + toComponent + "/" + toPortNum + "\"";
    }
}
